﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CricketAdmin.master" AutoEventWireup="true"
    CodeFile="ClearData.aspx.cs" Inherits="ClearData" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <script type="text/javascript">
        function selectAll() {
            debugger;
            var tbl = document.getElementById("<%=chkMatch.ClientID%>");
            var tblChk = tbl.getElementsByTagName("input");
            for (var i = 0; i < tblChk.length; i++) {
                if (tblChk[i].type == "checkbox") {
                    tblChk[i].checked = true;
                    
                }
            }
            return false;
        }

        function deSelectAll() {

            var tbl = document.getElementById("<%=chkMatch.ClientID%>");
            var tblChk = tbl.getElementsByTagName("input");
            for (var i = 0; i < tblChk.length; i++) {
                if (tblChk[i].type == "checkbox") {
                    tblChk[i].checked = false;
                }
            }
            return false;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <div class="container-fluid">
        <h3 class="page-title">
            Add match<small></small>
        </h3>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <div class="portlet box blue">
                <div class="portlet-title">
                    <div class="caption">
                        Clear Data</div>
                </div>
                <div class="portlet-body form">
                    <div class="form-horizontal form-view">
                        <div class="row-fluid">
                            <div class="span6">
                                <div class="control-group">
                                    <label class="control-label">
                                        Select Match<span class="required">*</span></label>
                                    <div >
                                        <asp:CheckBoxList ID="chkMatch" runat="server" RepeatDirection="Horizontal" RepeatColumns="3">
                                        </asp:CheckBoxList>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-actions">
                            <input id="btnSelect" type="button" name="Select" class="btn red" onclick="return selectAll()"
                                value="Select" />
                            <input id="btnDeSelect" type="button" name="DeSelect" class="btn red" onclick="return deSelectAll()"
                                value="Deselect" />
                            <asp:Button ID="btnSubmit" runat="server" Text="Submit" CssClass="btn red" OnClick="btnSubmit_Click" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
